package com.gxa.controller.StoreOptions;

import com.gxa.pojo.ShopSet;
import com.gxa.utils.Constants;
import com.gxa.utils.ResponseData;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * User: tx
 * Date: 2020/11/26 10:54
 * Description:
 * Version: V1.0
 */
@RestController
@Api(value = "商店信息设置",tags = "商店信息设置")
@RequestMapping(value = "options")
public class StoreOptionsController {

    @Autowired
    private ResponseData responseData;
    @Autowired(required = false)
    private Constants constants;

    @PostMapping("/addShopOptions")
    @ApiOperation(value = "添加商店信息设置",notes = "根据提交的信息添加商店信息设置",httpMethod = "POST",response = ResponseData.class)
    @ApiResponses({
            @ApiResponse(code = 200, message = "添加成功"),
            @ApiResponse(code = 400, message = "找不到页面"),
            @ApiResponse(code = 500, message = "添加失败")
    })
    public ResponseData addShopOption(@RequestBody @ApiParam(name = "shopSet",value = "商店信息",required = true) ShopSet shopSet){
        responseData.setCode(Constants.SUCCESS);
        responseData.setMsg("添加成功");
        responseData.setData(null);
        return responseData;
    }
}
